#include "runprogramcheckdialog.h"
#include "ui_runprogramcheckdialog.h"
#include <qdesktopwidget.h>

RunProgramCheckDialog::RunProgramCheckDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::RunProgramCheckDialog)
{
    ui->setupUi(this);

    this->setWindowFlags(Qt::FramelessWindowHint);    //无边框
    this->setStyleSheet("outline: none;");            //无虚线框
    QDesktopWidget *pDesk = QApplication::desktop();
    move((pDesk->width() - width()) / 2, (pDesk->height() - height()) / 2);
}

RunProgramCheckDialog::~RunProgramCheckDialog()
{
    delete ui;
}

void RunProgramCheckDialog::changeLanguage()
{
    ui->retranslateUi(this);
}

void RunProgramCheckDialog::on_sureBtn_clicked()
{
    emit setRunAllow(true);
    this->hide();
}

void RunProgramCheckDialog::on_cancelBtn_clicked()
{
    emit setRunAllow(false);
    this->hide();
}
